package com.cungmua.app.activity;

import android.os.Bundle;
import android.os.Handler;

import com.cungmua.app.R;
import com.cungmua.app.base.BaseActivity;

/**
 * Created by kelvin.nguyen on 6/16/14.
 */
public class SplashScreenActivity extends BaseActivity{
    // Splash screen timer
    private static int SPLASH_TIME_OUT = 2000;

    @Override
    public int getLayoutResource() {
        return R.layout.activity_splash_screen;
    }

    @Override
    public void updateView() {

            new Handler().postDelayed(new Runnable() {


            /*
             * Showing splash screen with a timer. This will be useful when you
             * want to show case your app logo / company
             */

                @Override
                public void run() {
                    // This method will be executed once the timer is over
                    // Start your app main activity
                    if (getCurrentCity() == null)
                        goToChooseCity();
                    else
                        goToHotDeal();
                    // close this activity
                    finish();
                }
            }, SPLASH_TIME_OUT);

    }

    @Override
    public void loadControls(Bundle savedInstanceState) {

    }
}
